﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LAMSDK.Database.Entities;
using System.ComponentModel.DataAnnotations;

namespace LAMSDK.Log.Entities
{
    /// <summary>
    /// 日志分类
    /// </summary>
    public class LogCategory:IEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity), Column("Id")]
        public long Id { get; set; }
        /// <summary>
        /// 编码
        /// </summary>
        [Required,Column("CateCode"), MinLength(2), MaxLength(20)]
        public long CateCode { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [Required,Column("CateName"), MinLength(2), MaxLength(20)]
        public string CateName { get; set; }
        /// <summary>
        /// 父类型Id
        /// </summary>
        [Column("ParentId")]
        public long ParentId { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        [Column("CreateTime")]
        public string CreateTime { get; set; }
        /// <summary>
        /// 删除日期
        /// </summary>
        [Column("DeleteTime")]
        public DateTime DeleteTime { get; set; }
        /// <summary>
        /// 是否已删除
        /// </summary>
        [Column("IsDeleted")]
        public bool IsDeleted { get; set; }

        public LogCategory()
        {
            this.IsDeleted = false;
        }
    }
}
